@extends('layouts.admin')
@push('morecss')
@endpush

@push('morescript')
@endpush
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            @if (!empty($wxMpList))
                @foreach ($wxMpList as $mp)
                    <div class="col-lg-3">
                        <div class="contact-box">
                            <div class="col-sm-4 text-center">
                                <img alt="image" style="margin: 0 auto;" class="img-circle img-md img-responsive" src="{{$mp['head_img']}}">
                                <div class="m-t-xs">
                                    <span class="badge badge-success">
                                        {{$mp['type_name']}}
                                    </span>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <p>
                                    <h3><strong>{{$mp['nick_name']}}</strong></h3>
                                    <p>{{$mp['appid']}}</p>

                                </p>
                                <p>
                                    <a href="{{ route('admin.wxmplist.setuserwxmp', ['appid'=>$mp['appid']]) }}" class="btn btn-primary">点击选择</a>
                                </p>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                @endforeach
            @else
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content text-center p-md">
                            <h2><span class="text-navy">暂无可用微信应用</span></h2>
                            <p>
                                @can('admin.wxmplist.index')
                                    请前往微信应用管理端添加应用,点击<a href="{{ route('admin.wxmplist.index') }}">
                                        <i class="fa fa-th-large"></i> <strong>管理微信应用</strong>
                                    </a>
                                @endcan
                                @cannot('admin.wxmplist.index')
                                    请联系管理员添加微信应用管理权限
                                @endcannot
                            </p>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
@endsection